<template>
	<view class="job-container" @click="navigator">
		<view class="job-header">
			<view class="job-title">
				{{info.name || '-'}}
			</view>
			<view class="jon-price">
				{{info.salary || '-'}}
			</view>
		</view>
		<view class="job-require">
			{{info.age || '-'}}｜ {{info.educational || '-'}}｜{{info.experience || '-'}}
		</view>
		<view class="job-tag">
			<view class="job-tag-item" v-for="(item,index) of info.tag" :key="index">
				{{item}}
			</view>
		</view>
		<view class="job-bottom">
			<view class="job-source">
				信息来源：{{info.role_type == 'role_normal'?'个人发布':info.role_type == 'role_comp'?'企业发布':info.role_type == 'role_manager'?'平台发布':'-'}}
			</view>
			<view class="job-address">
				{{info.address}}
			</view>
		</view>
		<view class="" v-if="info.audit_status == 2">
			<view class="" style="margin: 20rpx 0;">
				<u-line ></u-line>
			</view>
			
			<view class="row">
				<view class="label">
					失败原因:
				</view>
				<view class="value">
					{{info.reject_remark}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			info: {
				default: () => {
					return {}
				}
			},
			show_mark: {
				default: false
			}
		},
		methods: {
			navigator(){
				if(this.info.task_id){
					uni.navigateTo({
						url: `/pages/job_detail/index?task_id=${this.info.task_id}&name=${this.info.name}`,
					})
				}
				
			}
		}
	}
</script>

<style scoped lang="scss">
	.job-container{
		margin: 20rpx auto;
		width: 692rpx;
		background-color: #fff;
		padding: 24rpx;
		box-sizing: border-box;
		border-radius: 20rpx;
		.job-header{
			display: flex;
			align-items: center;
			.job-title{
				flex: 1;
				overflow: hidden;
				text-overflow: ellipsis;
				color: #000000;
				font-size: 38rpx;
				font-weight: bold;
			}
			.jon-price{
				color: #005DFF;
				font-size: 38rpx;
				font-weight: 500;
			}
		}
		.job-require{
			margin: 16rpx 0;
			font-weight: 400;
			font-size: 29rpx;
			color: #9E9E9E;
			line-height: 44rpx;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		.job-tag{
			margin: 16rpx 0;
			display: flex;
			align-items: center;
			.job-tag-item{
				padding: 0 18rpx;
				background-color: #E9F1FF;
				line-height: 46rpx;
				font-size: 28rpx;
				color: #005DFF;
				text-align: center;
				border-radius: 46rpx;
			}
			.job-tag-item+.job-tag-item{
				margin-left: 12rpx;
			}
		}
		.job-bottom{
			margin: 16rpx 0 0;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.job-source{
				font-size: 27rpx;
				color: #9E9E9E;
				line-height: 40rpx;
			}
			.job-address{
				text-align: right;
				flex: 1;
				font-size: 27rpx;
				color: #9E9E9E;
				line-height: 40rpx;
			}
		}
		.row{
			display: flex;
			.label{
				font-weight: bold;
				font-size: 23rpx;
				color: #000000;
				line-height: 38rpx;
				margin-right: 10rpx;
			}
			.value{
				flex: 1;
				font-weight: 400;
				font-size: 23rpx;
				color: #000000;
				line-height: 38rpx;
				text-align: left;
				font-style: normal;
			}
		}
	}
</style>